#ifndef __BINARYTREE_H__
#define __BINARYTREE_H__
#include <string>

template<typename T1,typename T2>
struct Pair
{
    T1 key;
    T2 value;

};
template<typename T>
struct HashPair:public Pair<std::string,T>//模板的偏特化:部分的模板明确类型
{

};
// template<>
// class Student :public Pair<std::string,int>
// {};

template<typename T1,typename T2>
class BinaryTree
{
public:
    BinaryTree()
    {
        root=nullptr;
    }
    void Insert(const Pair<T1,T2>&element)
    {

    }

private:
    TreeNode *InsertNode(TreeNode *node, const Pair<T1,T2> &element);


    struct Node
    {   
        TreeNode(const Pair<T1,T2> &element)
        {
            p = element;
            left = right= nullptr;
        }
        Pair<T1,T2> p;
        Node*left;
        Node*right;
    };
    Node*root;
};







#endif